﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IReport.cs" company="None">
//   <Author>Adrian von Allmen, 2013</Author>
// </copyright>
// <summary>
//   Defines the IReport type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace CrumbleLibrary
{
    using System.Collections.Generic;
    using System.Globalization;
    using System.Resources;

    /// <summary>
    /// The Report interface.
    /// </summary>
    public interface IReport
    {
        #region Properities
        /// <summary>
        /// Get Assembly Build Version.
        /// </summary>
        string GetVersion { get; }

        /// <summary>
        /// Gets the get report type.
        /// </summary>
        HelperLibrary.ReportType GetReportType { get; }

        /// <summary>
        /// Gets a value indicating whether to load the report on startup.
        /// </summary>
        bool LoadOnStartup { get; }

        /// <summary>
        /// Gets or sets the report language.
        /// </summary>
        CultureInfo ReportLanguage { get; set; }

        /// <summary>
        /// Gets or sets the parameter items.
        /// </summary>
        Dictionary<string, FilterParameterItem> ParameterItems { get; set; }
        #endregion

        #region Methods
        
        /// <summary>
        /// Load the Report Definition/Layout based on Report Type;
        /// </summary>
        /// <returns> Report Definition as expected Object </returns>
        object LoadReport();

        /// <summary>
        /// Retrieve the instruction for retrieve/generate the data of the report
        /// </summary>
        /// <returns>The instructions as object </returns>
        object GetDataInstruction();

        /// <summary>
        /// The get internal translation resource file
        /// </summary>
        /// <returns>The ResourceManager Reference of the assembly translation values </returns>
        ResourceManager GetInternalTranslaion();

        /// <summary>
        /// Define the used Filter and their parameter
        /// </summary>
        /// <returns>A list with selected filters </returns>
        Dictionary<string, List<FilterParameterItem>> SetFilter();

        /// <summary>
        /// Convert the Values retrieved from Filter to apply in current report scope
        /// </summary>
        /// <param name="originParameterItems"> The origin parameter items. </param>
        /// <returns>The reformatted parameter items </returns>
        Dictionary<string, FilterParameterItem> ConvertValues(Dictionary<string, FilterParameterItem> originParameterItems);

        #endregion
    }
}
